package com.zl.common.enums.code;

import com.zl.common.enums.code.IDictEnum;

/**
 * 
 * @author zhouliang
 *
 */
public class DatabaseTypeEnum {
    
    /** 数据库类型 */
    public enum DB_DRIVER implements IDictEnum{
        /**阿里云*/
        OCEAN_BASE("oceanbase", "阿里云OceanBase","com.alipay.oceanbase.jdbc.driver.OceanbaseDriver","jdbc:oceanbase://localhost:54321/mydatabase"),
        /**华为云*/
        GAUSS("gauss", "华为云GaussDB","com.huawei.gauss.jdbc.ZenithDriver","jdbc:zenith://localhost:54321/mydatabase"),
        /**金仓*/
        KING_BASE("kingbase", "金仓KingbaseES","com.kingbase.Driver","jdbc:kingbase://localhost:54321/mydatabase"),//与PostgreSql
        DB2("db2", "DB2","com.ibm.db2.jcc.DB2Driver","jdbc:db2://localhost:446/mydatabase"),
        
        SYBASE("sybase", "Sybase","com.sybase.jdbc4.jdbc.SybDriver","jdbc:sybase:Tds:localhost:2638/mydatabase?CHARSET=UTF-8"),
        SQLITE("sqlite", "SQLite","org.sqlite.JDBC","jdbc:sqlite:/your_path/database/file.db"),//与mysql
        MARIADB("mariadb", "MariaDB","org.mariadb.jdbc.Driver","jdbc:mariadb://localhost:3306/mydatabase"),//与mysql

        HSQLDB("hsqldb", "HSQLDB","org.hsqldb.jdbcDriver","jdbc:hsqldb:mydatabase"),
        H2("h2", "H2","org.h2.Driver","jdbc:h2:~/mydatabase"),
        PHOENIX("phoenix", "Phoenix","org.apache.phoenix.jdbc.PhoenixDriver","jdbc:phoenix:localhost:2181:/hbase"),
        HERDDB("herddb", "HerdDB","io.herd.db.jdbc.HerdDBDriver","jdbc:herddb:localhost:7000"),
        ORACLE9I("oracle9i", "Oracle 9i","oracle.jdbc.driver.OracleDriver","jdbc:oracle:thin:@localhost:1521:mydatabase"),//与oracle类似
        AS400("as400", "IBM AS/400","com.ibm.as400.access.AS400JDBCDriver","jdbc:as400://localhost/mydatabase"),
        INFORMIX("informix", "Informix","com.informix.jdbc.IfxDriver","jdbc:informix-sqli://localhost:1526/mydatabase:INFORMIXSERVER=server_name"),
        INFORMIX_SQI("informix-sqli", "Informix","com.informix.jdbc.IfxSqliDriver","jdbc:informix-sqli://localhost:1526/mydatabase:INFORMIXSERVER=server_name"),
        DERBY("derby", "Apache Derby","org.apache.derby.jdbc.ClientDriver","jdbc:derby://localhost:1527/mydatabase;create=true"),
        EDB("edb", "EnterpriseDB","com.edb.Driver","jdbc:edb://localhost:5444/mydatabase"),//与oracle类似
        OSCAR("oscar", "OSCAR","com.oscarsql.OscarDriver","jdbc:oscar://localhost/mydatabase"),
        CLICKHOUSE("clickhouse", "ClickHouse","ru.yandex.clickhouse.ClickHouseDriver","jdbc:clickhouse://localhost:8123/mydatabase"),
        HIGHGO("highgo", "高斯数据库","com.highgo.jdbc.Driver","jdbc:highgo://localhost/mydatabase"),//与hsqldb类似
        XUGU("xugu", "虚谷数据库","com.xugu.cloudjdbc.Driver","jdbc:xugu://localhost:5138/mydatabase"),//与hsqldb类似
        IMPALA("impala", "Impala","com.cloudera.impala.jdbc41.Driver","jdbc:impala://localhost:21050/mydatabase"),//与hsqldb类似
        FIREBIRDSQL("firebirdsql", "Firebird","org.firebirdsql.jdbc.FBDriver","jdbc:firebirdsql:localhost/3050:mydatabase"),
       
        HIVE2("hive2", "Hive2","org.apache.hive.jdbc.HiveDriver","jdbc:hive2://localhost:10000/mydatabase"),//与mysql
        DM("dm", "达梦","dm.jdbc.driver.DmDriver","jdbc:dm://localhost:5236/mydatabase"),
        ORACLE("oracle", "Oracle","oracle.jdbc.OracleDriver","jdbc:oracle:thin:@localhost:1521:mydatabase"),
        MYSQL("mysql", "Mysql","com.mysql.cj.jdbc.Driver","jdbc:mysql://localhost:3306/mydatabase?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai"),
        SQLSERVER("sqlserver", "Sqlserver","com.microsoft.sqlserver.jdbc.SQLServerDriver","jdbc:sqlserver://localhost:1433;databaseName=mydatabase"),
        POSTGRESQL("postgresql", "Postgresql","org.postgresql.Driver","jdbc:postgresql://localhost:5432/mydatabase"),
        
        ;
        private String code;
        private String msg;

        DB_DRIVER(String code, String msg,String driver,String url) {
            this.code = code;
            this.msg = msg;
        }
        @Override
        public String getCode() {
            return code;
        }
        @Override
        public String getMsg() {
            return msg;
        }

    }
}
